<!-- 客服中心 -->
<template>
	<view class="page">
		<view class="list">
			<view class="item flex justify-between align-center" v-for="item in list" :key="item.customerServiceId" @click="linkto(item)">
				<view class="title">
					{{item.customerServiceTitle}}
				</view>
				<view class="icon">
					<u-icon name="arrow-right" size="26"></u-icon>
				</view>
			</view>
			<button class="item flex justify-between align-center" open-type="contact">
				<view class="title">
					在线客服
				</view>
				<view class="icon">
					<u-icon name="arrow-right" size="26"></u-icon>
				</view>
			</button>
		</view>
		<view class="button flex justify-center align-center" @click="link">
			意见反馈
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list:[]
			}
		},
		methods: {
			//意见反馈按钮
			link(){
				uni.navigateTo({
					url: '/pagesB/feedback/feedback'
				})
			},
			async getData() {
				let {data: list} = await this.$get('/user/customerService')
				console.log(list)
				this.list = list
			},
			linkto(item) {
				uni.navigateTo({
					url: '/pagesB/service/service?item=' + JSON.stringify(item)
				})
			}
		},
		onLoad() {
			this.getData()
			
		}
	}
</script>

<style lang="scss">
.page{
	min-height: 100vh;
	position: relative;
	.list{
		padding: 0 30rpx;
		.item{
			height: 120rpx;
			font-weight: 500;
			color: #333333;
			font-size: 32rpx;
			border-bottom: 1rpx solid #f5f5f5;
		}
	}
	.button{
		position: absolute;
		left: 30rpx;
		bottom: calc(30rpx + env(safe-area-inset-bottom));
		width: 690rpx;
		height: 84rpx;
		background: #0265EB;
		border-radius: 42rpx;
		color: #ffffff;
		font-weight: bold;
		font-size: 32rpx;
		box-shadow: 0px 10px 10px rgba(12,108,240, .4);
	}
}
</style>
